import { InjectionToken } from "tsyringe";

export class Context {
    data: any = {};
    get<D>(key?: InjectionToken<D>): D {
        if (key) return this.data[key as string]
        return this.data as any;
    }
    set<D>(key: InjectionToken<D>, data: D): void {
        this.data[key as string] = data;
    }
}